<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>demo</title>
 <jsp:include page="addGiftInfo.jsp"></jsp:include> 
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../js/jquery-1.9.1.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jqPaginator.js"></script>
<script src="../giftInfo/giftInfo.js"></script>
<!-- Bootstrap -->

<link href="../css/bootstrap.min.css" rel="stylesheet" />
<link href="../giftInfo/giftInfo.css" rel="stylesheet" />


<style>
	.alllists {
		width: 100%;
	}
	.buttonSt{
		text-align: right;
	}
	#trTh th {
		text-align: center;
	}

/* 点击图片放大 */
	.black_overlay{ 
		display: none; 
		position: absolute; 
		top: 0%; 
		left: 0%; 
		width: 100%; 
		height: 100%; 
		background-color: black; 
		z-index:1001; 
		-moz-opacity: 0.8; 
		opacity:.80; 
		filter: alpha(opacity=88); 
	} 
	.white_content { 
		display: none; 
		position: absolute; 
		margin:auto; 
		text-align:center;
		padding: 20px; 
		/* border: 10px solid orange;  */
		border:0;
		background-color: white; 
		z-index:1002; 
		overflow: auto;
		border:1px #00F solid; 
	} 
</style> 
<script type="text/javascript">
  	function aa(){
		document.getElementById('light').style.display='block';
		document.getElementById('fade').style.display='block';
	}
	function bb(){
		document.getElementById('light').style.display='none';
		document.getElementById('fade').style.display='none';
	}
</script>
</head>
<body>
	<div class="container-fluid alllists">
		<div class="row-fluid">
			<div class="span12">
				<div id="tools" class="buttonSt">
					<button id="addGiftInfo" class="btn btn-primary btn-large" type="button"
						data-toggle="modal" >添加</button>
					<button id="deleteBtn" class="btn btn-large btn-danger"
						type="button">删除</button>
					<button id="shelveBtn" class="btn btn-large btn-warning" 
						type="button">上架</button>
					<button id="unShelveBtn" class="btn btn-large btn-inverse" 
						type="button">下架</button>
				</div>
				<div>
					<table id="giList" class="table table-bordered table-hover">
						<thead>
							<tr id="trTh">
								<th><input id="selectAll" class="checkbox" type="checkbox" /></th>
								<th>编号</th>
								<th>礼品名称</th>
								<th>礼品主照片</th>
								<th>价格</th>
								<th>折扣</th>
								<th>上下架</th>
								<th>查看规格库</th>
								<th colspan="2">状态</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${pageResult.resultList}" var="lg">
								<tr>
									<td><input name="giId" id="giId" class="checkbox" type="checkbox" value="${lg.id}" />
									</td>
									<td>${lg.giftCode}</td>
									<td>${lg.giftName}</td>
									<%-- <td>${lg.pic}
										<div style=" width:100px; height:30px;overflow:hidden;">
											<img src="<%=request.getContextPath()%>/HRTWEB/images/23/${lg.pic}" 
												border="0" width="100px" />
										</div>
									</td> --%>
									<td>
										<div style=" width:100px; height:30px;overflow:hidden;">
											<a href = "javascript:void(0)" onclick = "aa();">
												<img src="<%=request.getContextPath()%>/HRTWEB/images/23/${lg.pic}" 
													border="0" width="100px" />
											</a>
										</div>
										<div id="light" class="white_content"> 
								            <a href = "javascript:void(0)" onclick = "bb();">
								            	<img src="<%=request.getContextPath()%>/HRTWEB/images/23/${lg.pic}" />
								            </a>
								        </div> 
								        <div id="fade" class="black_overlay"></div>
									</td>
									<td>${lg.promotion}</td>
									<td>${lg.discount}</td>
									<td>
										<c:choose>
											<c:when test="${lg.ispush==0}">
										       	下架
										    </c:when>
											<c:otherwise>
												<font color="red">上架</font>
											</c:otherwise>
										</c:choose>
									</td>
									<td><button name="viewRule" objId="${lg.id}"
											class="btn btn-sm-block btn-sm-info">查看规格库</button>
									</td>
									<%-- <td><a href="<%=request.getContextPath() %>/manage/giftDetail/list.do"><button name="viewRule" objId="${lg.id}"
											class="btn btn-sm-block btn-sm-info">查看规格库</button></a>
									</td> --%>
									<td><button name="editBtn" objId="${lg.id}"
											class="btn btn-sm-block btn-sm-info">修改</button>
									</td>
									<td>
										<button id="checkBtn" name="checkBtn" objId="${lg.id}"
											class="btn btn-sm-block btn-sm-info">查看</button></td>
								</tr>
							</c:forEach>
						<tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
	<div style="text-align: center;">
		<ul class="pagination" id="pagination2"></ul>
	</div>
	<div style="text-align: center;">
		<div id="pageResult">
			<input id="pageCount" type="hidden" value="${pageResult.pageCount}" />
			<input id="totalCount" type="hidden" value="${pageResult.totalCount}" />
			<input id="pageIndex" type="hidden" value="${pageResult.pageIndex}" />
			<input id="pageSize" type="hidden" value="${pageResult.pageSize}" />
		</div>
		<!-- footer -->

	</div>

</body>

</html>